<%@page import="cn.edu.hust.sse.software7.class3.entities.EBAdmin"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<%
	List<EBAdmin> admins = (List<EBAdmin>) session
			.getAttribute("adminList");
%>
<title>List Admins</title>
</head>
<body>
<%
	if (admins.isEmpty() || null == admins) {
%>
!没有管理员!
<%
	} else {
%>
<table style="width: 100%;">
	<tr style="background-color: gray;">
		<td><b>ID</b></td>
		<td><b>管理员用户名</b></td>
		<td><b>激活</b></td>
		<td><b>描述</b></td>
		<td></td>
	</tr>
	<%
		for (EBAdmin admin : admins) {
	%>
	<tr style="background-color: activeborder; border: medium;">
		<td><%=admin.getAdId()%></td>
		<td><%=admin.getAdName()%></td>
		<td><%=admin.isEnable() ? 'Y' : 'N'%></td>
		<td><%=admin.getDescription()%></td>
		<td><a
			href="/goto?page=updateadmin&admin2Update=<%=admin.getAdId().longValue()%>">修改</a>
		<a
			href="/admin?method=delete&admin2Delete=<%=admin.getAdId().longValue()%>">删除</a>
		</td>
	</tr>
	<%
		}
	%>
</table>
<%
	}
%>
<a href="/admin/adminManage/addAdmin.jsp">添加管理员</a>
</body>
</html>